<?php 
	echo $this->element('reportcss');
	$file_name = "人才项目资助情况统计表";
	if(empty($report)){?>
<div class="right_side_operate_area">
	<div class="right_side_title left">
		<h2><?php echo $file_name;?></h2>
	</div>
    <?php
    	$url_explode=explode("group=", $_SERVER["QUERY_STRING"]);
    	echo '<div class="right back_btn">';
		echo $html->link("导出报表","/reports/talentrewardreport/1?group=".$url_explode[1]);
		echo '</div>';
	?> 
<?php echo $this->element('reportgroup'); ?>		
	<div class="clear"></div>
</div>
<div class="right_side_scollbar">
    <div class="detail_info_panel">
        <div class="items_list">
<?php }?>
			<?php 
        		if(!empty($report)){
        			echo "<div align='center'><h3>$file_name</h3></div>";
        		}
        	?>
        	<table border='1'>
            	<tr>
            		<th>序号</th>
                    <th>人才项目名称</th>
		 			<th>人才姓名</th>
		 			<th>企业名称</th>
		 			<td>模块</td>
		 			<th>获奖时间</th>		 			
		 			<th>获奖金额（万元）</th>
                </tr>
                <?php 
                	foreach ($objreward as $reward){
                		$objtalent=$reward["talent"];
						$rowscount=count($objtalent);
						$id=$reward["id"];
						$tname=$reward["tname"];
						$i=0;
						foreach ($objtalent as $talent){
							$groupname = $grouplist[$talent["SearchCompany"]["groupid"]];
	                		echo '<tr>';
	                			if($i==0){
		                			echo '<td align="center" rowspan="'.$rowscount.'">'.$id."</td>";
		                			echo '<td align="center"  rowspan="'.$rowscount.'">'.$tname."</td>";
	                			}
	                			echo "<td align='center' >".$talent["SearchCompany"]["contact"]."</td>";
	                			echo "<td align='center' >".$talent["SearchCompany"]["company_name"]."</td>";
	                			echo "<td align='center' >".$groupname."</td>";
	                			if($talent["CompTalent"]["project_time"]=="0000-00-00"){$talent["CompTalent"]["project_time"]="";}
	                			echo "<td align='center' >".$str->formatCell($talent["CompTalent"]["project_time"])."</td>";
	                			echo "<td align='center' >".$talent["CompTalent"]["award"]."</td>";
	                		echo "</tr>";
	                		$i++;
						}
	                	if($i==0){
							echo "<tr>";
							echo "<td align='center' >".$id."</td>";
							echo "<td align='center' >".$tname."</td>";
							echo "<td></td>";
							echo "<td></td><td></td><td></td>";
							echo "</tr>";
						}
	                }
                ?>
            </table>
<?php if(empty($report)){?>
		</div>
    </div>
</div>
<?php }?>